package com.vpclub.controller;

import com.vpclub.service.HelloService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

/**
 * @author : leimingchao
 * @date Date : 2021年07月06日 0:30
 */
@Controller
public class HelloController {

    @Autowired
    private HelloService helloService;

    @RequestMapping(value = "/hello")
    @ResponseBody
    public String hello() {
        String tomcat = helloService.sayHello("tomcat");
        return tomcat;
    }

    /**
     * /WEB-INF/views/success.jsp
     * @return
     */
    @RequestMapping(value = "success")
    public String success() {
        return "success";
    }
}
